
import 'dart:async';

import 'package:flutter/services.dart';

class Tupgrade {
  static const MethodChannel _channel = MethodChannel('tupgrade');

  static Future<String?> get platformVersion async {
    final String? version = await _channel.invokeMethod('getPlatformVersion');
    return version;
  }

  static installAppForAndroid(String path) async {
    var map = {'path': path};
    return await _channel.invokeMethod('install', map);
  }

  ///
  /// 跳转到ios app store
  ///
  static toAppStore(String id) async {
    var map = {'path': id};
    return await _channel.invokeMethod('toAppStore', map);
  }
  
}
